package com.lxl.xm.controller;

import com.lxl.xm.chat.V4OkHttpClient;
import com.lxl.xm.common.BaseResponse;
import com.lxl.xm.common.ResultUtils;
import com.zhipu.oapi.service.v4.model.ModelApiResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


@RestController
@RequestMapping("/chat")
@Slf4j
public class ChatController {



    @PostMapping
    public BaseResponse<ModelApiResponse> chatWithAI(String content){
        return ResultUtils.success(V4OkHttpClient.Invoke(content));
    }
}
